import httpInstance from "@/utils/https"


//获取最新的购物车列表
export function findNewCartListAPI() {
    return httpInstance({
        url:'/member/cart'
    })
}


//根据sku对象进行新增购物车
export function insertCartAPI(sku) {
    return httpInstance.post('/member/cart',sku)
}

//根据id删除购物车
export function delCartAPI(ids) {
    return httpInstance.delete('/member/cart',{data:{ids}})
}

//合并购物车
export function mergeCartAPI(data) {
    return httpInstance.post('/member/cart/merge',data)
}

//修改购物项
export function updateCartItem(skuId,data) {
    return httpInstance.put(`/member/cart/${skuId}`,data)
}